package com.roamer.javase.demo.weather;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * 天气
 *
 * @author roamer
 * @version v1.0
 * @date 2020/3/26 12:26
 */
@NoArgsConstructor
@Data
public class WeatherRestResult implements Serializable {

    /**
     * reason : 查询成功!
     * result : {"city":"上海","realtime":{"temperature":"20","humidity":"97","info":"阴","wid":"02","direct":"北风","power":"0级","aqi":"49"},"future":[{"date":"2020-03-26","temperature":"13/25℃","weather":"小雨转大雨","wid":{"day":"07","night":"09"},"direct":"北风转南风"},{"date":"2020-03-27","temperature":"9/14℃","weather":"小雨","wid":{"day":"07","night":"07"},"direct":"南风"},{"date":"2020-03-28","temperature":"8/11℃","weather":"阴","wid":{"day":"02","night":"02"},"direct":"西南风转西风"},{"date":"2020-03-29","temperature":"9/13℃","weather":"中雨","wid":{"day":"08","night":"08"},"direct":"西风转北风"},{"date":"2020-03-30","temperature":"8/14℃","weather":"小雨转多云","wid":{"day":"07","night":"01"},"direct":"东风转东南风"}]}
     * error_code : 0
     */

    private String reason;
    private ResultBean result;
    private int error_code;

    @NoArgsConstructor
    @Data
    public static class ResultBean {
        /**
         * city : 上海
         * realtime : {"temperature":"20","humidity":"97","info":"阴","wid":"02","direct":"北风","power":"0级","aqi":"49"}
         * future : [{"date":"2020-03-26","temperature":"13/25℃","weather":"小雨转大雨","wid":{"day":"07","night":"09"},"direct":"北风转南风"},{"date":"2020-03-27","temperature":"9/14℃","weather":"小雨","wid":{"day":"07","night":"07"},"direct":"南风"},{"date":"2020-03-28","temperature":"8/11℃","weather":"阴","wid":{"day":"02","night":"02"},"direct":"西南风转西风"},{"date":"2020-03-29","temperature":"9/13℃","weather":"中雨","wid":{"day":"08","night":"08"},"direct":"西风转北风"},{"date":"2020-03-30","temperature":"8/14℃","weather":"小雨转多云","wid":{"day":"07","night":"01"},"direct":"东风转东南风"}]
         */

        private String city;
        private RealtimeBean realtime;
        private List<FutureBean> future;

        @NoArgsConstructor
        @Data
        public static class RealtimeBean {
            /**
             * temperature : 20
             * humidity : 97
             * info : 阴
             * wid : 02
             * direct : 北风
             * power : 0级
             * aqi : 49
             */

            private String temperature;
            private String humidity;
            private String info;
            private String wid;
            private String direct;
            private String power;
            private String aqi;
        }

        @NoArgsConstructor
        @Data
        public static class FutureBean {
            /**
             * date : 2020-03-26
             * temperature : 13/25℃
             * weather : 小雨转大雨
             * wid : {"day":"07","night":"09"}
             * direct : 北风转南风
             */

            private String date;
            private String temperature;
            private String weather;
            private WidBean wid;
            private String direct;

            @NoArgsConstructor
            @Data
            public static class WidBean {
                /**
                 * day : 07
                 * night : 09
                 */

                private String day;
                private String night;
            }
        }
    }
}
